import Vue from 'vue'
import Router from 'vue-router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import HelloWorld from '@/components/HelloWorld'
import AccountManage from '@/components/ucenter/AccountManage'
import CheckMember from '@/components/memberManage/CheckMember'
import AddGood from '@/components/goodManage/AddGood'
import EditGood from '@/components/goodManage/EditGood'
import OrderHistory from '@/components/orderManage/OrderHistory'
import OrderList from '@/components/orderManage/OrderList'
import ServiceCenter from '@/components/serviceCenterManage/ServiceCenter'
import StoreManage from '@/components/ucenter/StoreManage'
import MemberManage from '@/components/memberManage/MemberManage'
import Login from '@/components/Login'
import Menu from '@/components/Menu'
import Regist from '@/components/regist'

Vue.use(Router)

Vue.use(ElementUI)
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: '登录页面',
      component: Login
    },
    {
      path: '/regist',
      name: '注册页面',
      component: Regist
    }, {
      path: '/menu',
      name: '菜单',
      component: Menu,
      redirect: '/menu/checkMember',
      children: [{
        path: 'memberManage',
        name: '会员统计',
        component: MemberManage
      }, {
        path: 'accountManage',
        name: '账户管理',
        component: AccountManage
      },
      {
        path: 'checkMember',
        name: '查看会员',
        component: CheckMember
      },
      {
        path: 'EditGood',
        name: '商品编辑',
        component: EditGood
      },
      {
        path: 'addGood',
        name: '添加商品',
        component: AddGood
      },
      {
        path: 'orderHistory',
        name: '历史订单',
        component: OrderHistory
      },
      {
        path: 'orderList',
        name: '订单列表',
        component: OrderList
      },
      {
        path: 'serviceCenter',
        name: '客服中心',
        component: ServiceCenter
      },
      {
        path: 'storeManage',
        name: '店铺管理',
        component: StoreManage
      }]
    }
  ]
})
